import os, re, shutil


def hit(f, fs):
    if re.search(r'[\W_^]ja[\W_$]', f):
        for i in ['zh_CN', 'zh']:
            if re.sub(r'(?<=[\W_^])ja(?=[\W_$])', i, f, 1) in fs:
                return True


l = ['epl-v10.html', 'license.html', 'about.html', 'asl-v20.txt']

for root, dirs, files in os.walk('d:/jdk'):
    os.chdir(root)
    for f in files:
        if hit(f, files) or f in l:
            print os.path.join(root, f)
            os.remove(f)
    for d in dirs:
        if hit(d, dirs):
            print os.path.join(root, d)
            shutil.rmtree(d)
